package com.viu.technology.config.datasource;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class DataSourceAspect {

	@Before("execution(* com.viu.technology.dao.*.*(..))")
	public void setDataSourceKey(JoinPoint point) {
		// 使用AOP切换数据源
		// DatabaseContextHolder.setDatabaseType(DatabaseType.DATASOURCE1);

	}
}
